package org.spring.boot.fusion.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

	@Autowired
	private Environment environment;

	@GetMapping("test")
	public ResponseEntity<String> test() {
		String property = environment.getProperty("server.port");
		return ResponseEntity.ok(property);
	}

}
